﻿using RayDen.Library.Core.Primitives;
using RayDen.RayEngine.Core.Surface;
using RayDen.RayEngine.Core.Types;

namespace RayDen.RayEngine.Core.Interface {

    public interface ILight
    {
        string Name { get; }
        bool IsDelta { get; }
        ISpectrum Le(ref Vector dir);

        void Le(ref Vector dir, ref ISpectrum le);

        RgbSpectrumInfo Emittance(ref Vector dir, out float pdf);

        EmissionProfile Profile { get; }

        void EvaluateShadow(ref Point point, ref Normal n, float u0, float u1, float u2, ref LightSample result);

        void SampleSpatialDirect(ref Point point, ref Normal n, float u0, float u1, float u2, ref LightSample ls);

        void SampleSpatialAdjoint(IRayEngineScene scene, float u0, float u1, float u2, float u3, float u4,
            out Vector dir, out float distance, out float pdf);

        void EvaluatePhoton(IRayEngineScene scene, float u0, float u1, float u2, float u3, float u4, out LightSample result);

    }

    public interface INewLight
    {
        void EvaluateShadow(BaseBxdf bsdfSample, float u0, float u1, float u2, ref LightSample result);        
    }
}